Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Dec 19, 2025

  • reduce file name font size from 15px to 14px
  • fix labels and buttons being cut off when their size is constrained
  • change labels from monospace to sans-serif font
  • move diff stats to right and change them from sum of changes to +/-
  • change filemode to label and change text to match other labels

Before

Screenshot 2025-12-20 at 18 02 15 Screenshot 2025-12-20 at 18 02 33

After

 Screenshot 2025-12-20 at 18 01 25

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 19, 2025
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Dec 19, 2025
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Dec 19, 2025
@silverwind silverwind marked this pull request as draft December 19, 2025 17:48
@silverwind silverwind added the topic/ui Change the appearance of the Gitea UI label Dec 19, 2025
@silverwind silverwind marked this pull request as ready for review December 20, 2025 17:05
* origin/main:
  Closed milestones with no issues now show as 100% completed (go-gitea#36220)
  Show edit page confirmation dialog on tree view file change (go-gitea#36130)
  Fix regression in writing authorized principals (go-gitea#36213)
  [skip ci] Updated translations via Crowdin
  Convert locale files from ini to json format (go-gitea#35489)
@silverwind
Copy link
Member Author

This is ready, I've updated OP and cleaned up the PR comments.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 20, 2025
@lunny
Copy link
Member

lunny commented Dec 21, 2025

move diff stats to right and change them from sum of changes to +/-

Why the change is better?

@silverwind
Copy link
Member Author

silverwind commented Dec 23, 2025

It's following GitHub's current design:

image

I think it's much more useful to see +/- instead of the current sum.

GitLab also has the +/- design, but they only show numbers:

image

Maybe later I will also implement this "5 boxes" design, but not in this PR.

@silverwind
Copy link
Member Author

silverwind commented Dec 24, 2025

The template on pull request tabs bar now also uses templates/repo/diff/stats.tmpl. Appearance is unchanged, tooltip is added (although I find this tooltip mostly unnecessary now).

image

@silverwind
Copy link
Member Author

silverwind commented Dec 24, 2025

One more enhancement, remove box-shadow hack.

Before: Ugly ":target" border:

Screenshot 2025-12-24 at 02 09 17

After: Clean border:

Screenshot 2025-12-24 at 02 09 38

I couldn't notice the "borders being visible behind top corners" problem, so likely this hack was obsolete anyways.

@wxiaoguang wxiaoguang force-pushed the diffhead branch 2 times, most recently from 03e4b7b to 9b8ef1f Compare January 12, 2026 09:31
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 12, 2026

These problems should have been fixed in the new commit.

And the font pollution conflicts caused by patches (font family, size) are also fixed.

image
image
image
image
image

@silverwind
Copy link
Member Author

That change is from your fix of " Fix all rounded borders, change affected tab menus to pills #30707 "

The box shadow hack was only for a problem only visible when the header was sticky, it shouldn't have any affect for non-sticky content.

@wxiaoguang
Copy link
Contributor

That change is from your fix of " Fix all rounded borders, change affected tab menus to pills #30707 "

The box shadow hack was only for a problem only visible when the header was sticky, it shouldn't have any affect for non-sticky content.

If you'd like to remove it, I am also fine. It doesn't really bother me. Simpler is better.

@wxiaoguang wxiaoguang marked this pull request as ready for review January 12, 2026 10:40
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 12, 2026

The last problem in my mind: Executable vs executable.

The problems:

  • LFS
  • generated
  • Executable or executable
  • changed mode: Executable -> Regular or executable -> regular

Personally I prefer to use Executable -> Regular and change generated to Generated

also see the screenshot in #36215 (comment)

image

@wxiaoguang wxiaoguang marked this pull request as draft January 12, 2026 11:10
@silverwind
Copy link
Member Author

Yeah I think we can consistently capitalize these tags.

@wxiaoguang
Copy link
Contributor

Fixed more layout problems:

image

@wxiaoguang wxiaoguang marked this pull request as ready for review January 12, 2026 11:40
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 12, 2026

I found some new things: there are some webkit-specfic styles:

.diff-file-header .file-link {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

I am not sure it really works well for various cases, or it works for other browsers. It seems not easy to change these styles at the moment.

Not bad on firefox:

Details image

Anyway, let's merge and try and do more improvements in the future (if necessary)

@wxiaoguang wxiaoguang added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 12, 2026
@wxiaoguang wxiaoguang added this to the 1.26.0 milestone Jan 12, 2026
@silverwind
Copy link
Member Author

-webkit-box is a special text rendering mode supported in all browsers. It's to ensure at maximum 2 lines of text are rendered. No browser currently implements the standard line-clamp as of today.

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/line-clamp

@wxiaoguang wxiaoguang merged commit 1d399bb into go-gitea:main Jan 12, 2026
24 checks passed
@wxiaoguang wxiaoguang deleted the diffhead branch January 12, 2026 12:29
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 12, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 13, 2026
* giteaofficial/main:
  fill missing `has_code` in repository api (go-gitea#36338)
  Fix notifications pagination query parameters (go-gitea#36351)
  Fix cancel auto merge bug (go-gitea#36341)
  Bump appleboy/git-push-action from 1.0.0 to 1.2.0 (go-gitea#36306)
  Improve diff file headers (go-gitea#36215)
  Fix delete attachment check (go-gitea#36320)
  [skip ci] Updated translations via Crowdin
  LFS locks must belong to the intended repo (go-gitea#36344)
  Update chroma to v2.22.0 (go-gitea#36342)
  Update goldmark to v1.7.16 (go-gitea#36343)
  Fix some trivial problems (go-gitea#36336)
  Fix diff view style handling (go-gitea#36324)
  Refactor cat-file batch operations and support `--batch-command` approach (go-gitea#35775)
  Fix file-tree ui error when adding files to repo without commits (go-gitea#36312)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants